<template>
  <div>
    <button>MaterialViewxxx</button>
    <div>xxx</div>
    <PersonChild></PersonChild>
    <person-child :a="3333"></person-child>
    <person-child :a="8888"></person-child>
    <person-child :a="b"></person-child>
    <ElButton type="primary" :circle="true">prop</ElButton>
    <template v-for="(e, i) in btns" :key="i">
      <ElButton :type="e.color">{{ e.name }}</ElButton>
    </template>
    <ElButton @click="getUnixTime">unix</ElButton>
  </div>
</template>
<script lang="ts">
/**
 * 页面核心数据结构体说明文档
 *
 *
 */
// import from

import { defineComponent } from 'vue'
import PersonChild from '@/components/PersonChild.vue'
import axios from 'axios'

export default defineComponent({
  name: 'MaterialView',
  components: { PersonChild },
  props: {
    sampleP: {
      type: Number,
      default: 0
    }
  },
  data() {
    return {
      sampleD: 'value',
      b: 555,
      btns: [
        {
          name: 'zhangsan',
          color: 'primary'
        },
        {
          name: 'lisi',
          color: 'warning'
        }
      ]
    }
  },
  computed: {
    /* sampleC() {
      return this.sampleD + "--";
    }, */
  },
  created() {},
  mounted() {},
  methods: {
    // sampleM() {},
    async getUnixTime() {
      const res = await axios({
        method: 'get',
        url: 'http://localhost:9090/time/unix'
      })
      console.log(res)
    }
  },
  watch: {
    // sampleP(n, o) {},
  }
})
</script>

<!--<style scoped>-->
<style lang="scss" scoped></style>
